<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8" />
    <title>聚合二维码支付</title>
    <link th:href="@{bootstrap/css/bootstrap.min.css}" rel="stylesheet" />
    <link th:href="@{bootstrap/css/bootstrap-theme.min.css}" rel="stylesheet" />

</head>
<body>

<script th:src="@{jquery-3.3.1.js}" type="text/javascript"></script>
<script th:src="@{bootstrap/js/bootstrap.min.js}" type="text/javascript"></script>

    <script th:inline="javascript">
        var qrCodeForm = [[${qrCodeForm}]];
        if(navigator.userAgent.match(/Alipay/i)) {
            // 支付宝
            window.location.href = qrCodeForm.aliQrcode;
        } else if(navigator.userAgent.match(/MicroMessenger\//i)) {
            // 微信
            window.location.href = qrCodeForm.wxQrcode + "&totalFee=" + qrCodeForm.totalFee;
        } else {
            window.location.href = qrCodeForm.aliQrcode;
        }

    </script>
</body>
</html>